package connect;

import java.io.Serializable;
import java.util.HashMap;
import java.util.Map;

public class Message implements Serializable{

	private static final long serialVersionUID = 1L;
	private byte type;//消息类型(1:心跳包,0:消息)
	private int command;//命令
	private Map<String, String> values=new HashMap<String, String>();//消息内容
	
	public byte getType() {
		return type;
	}
	public void setType(final byte type) {
		this.type = type;
	}
	
	public int getCommand() {
		return command;
	}
	public void setCommand(int command) {
		this.command = command;
	}
	
	public String getValue(final String key) {
		return values.get(key);
	}
	public void put(final String key,final String value) {
		values.put(key, value);
	}
	
	@Override
	public String toString() {
		return "type:"+type+"command:"+command+"values:"+values;
	}
	

}
